package leetcode_401_500;

import java.util.Arrays;

public class LeeCode_453 {
    public static void main(String[] args) {
        System.out.println(minMoves(new int[]{1,1,1000000000}));
    }
    private static int minMoves(int[] nums) {
        Arrays.sort(nums);
        int ans = 0;
        for (int num : nums) {
            ans += num - nums[0];
        }
        return ans;
    }
}
